module.exports = function ($scope, $modalInstance, $resource, $modal, item, toaster) {

    $scope.url = encodeURI(encodeURI('https://sjb.tripln.com/views/supplier/bxsd_yy_08.html?t='+item));

   
   
   
    function timing() {
        var qrcode = $scope.url;
        $('#qrcode').qrcode({ 
            width: 300, 
            height: 300, 
            text: qrcode 
        });
        clearInterval(intervalProcess);
      }
    var intervalProcess = setInterval(function () { timing() }, 100);


    //取消
    $scope.cancel = function () {
        $modalInstance.dismiss('cancel');
    };

};